package com.gjx.springboot.app.service.impl;

import com.gjx.springboot.app.service.EmployeesService;
import com.gjx.springboot.infra.mapper.EmployeesMapper;
import com.gjx.springboot.domain.entity.Employees;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service

public class EmployeesServiceImpl implements EmployeesService {
    @Resource
    EmployeesMapper employeesMapper;
    @Override
    public List<Employees> getAllEmployees() {
        List<Employees> allEmployees = employeesMapper.getAllEmployees();
        return allEmployees;
    }

    @Override
    public List<Employees> getEmployeesDepartMent() {
        List<Employees> departMentEmployees = employeesMapper.getDepartMentEmployees();
        return departMentEmployees;
    }

    @Override
    public Boolean insertOneEmployees(Employees employees) {
        Boolean aBoolean = employeesMapper.insertOneEmployees(employees);
        return aBoolean;
    }

    @Override
    public Boolean deleteOneEmployees(Integer employeeId) {
        Boolean aBoolean = employeesMapper.deleteEmployees(employeeId);
        return aBoolean;
    }

    @Override
    public Boolean updateOneEmployees(Employees employees) {
        Boolean aBoolean = employeesMapper.updateOneEmployees(employees);
        return aBoolean;
    }

    @Override
    public Integer insertMoreEmployees(List<Employees> employeesList) {
        Integer integer = employeesMapper.insertMoreEmployees(employeesList);
        return integer;
    }
}
